//
// Created by xili on 2024/8/11 下午7:11.
// Go big or go home.
//
#include "leetcode.h"

class Solution {
public:
    int takeAttendance(vector<int> &records) {
        int n = records.size();
        for (int i = 0; i < n; i++) {
            if (i != records[i]) {
                return i;
            }
        }
        return n;
    }
};